package pojo;



import java.math.BigDecimal;
import java.util.Date;

public class Invoice {
   private Integer id;
   private Boolean flag;
   private Integer gid;
   private String gname;
   private  String createTime;
   private Integer num;
    private BigDecimal price;
   private BigDecimal tprice;
   private Integer sid;
   private String sname;

    public Invoice() {
    }

    public Invoice(Integer id, Boolean flag, Integer gid, String gname, String createTime, Integer num, BigDecimal price, BigDecimal tprice, Integer sid, String sname) {
        this.id = id;
        this.flag = flag;
        this.gid = gid;
        this.gname = gname;
        this.createTime = createTime;
        this.num = num;
        this.price = price;
        this.tprice = tprice;
        this.sid = sid;
        this.sname = sname;
    }

    //逻辑视图
    public String getStatusStr(){
        if (flag == null){
            return "未知";
        }
        return flag ? "进货":"退货";
    }


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Boolean getFlag() {
        return flag;
    }

    public void setFlag(Boolean flag) {
        this.flag = flag;
    }

    public Integer getGid() {
        return gid;
    }

    public void setGid(Integer gid) {
        this.gid = gid;
    }

    public String getGname() {
        return gname;
    }

    public void setGname(String gname) {
        this.gname = gname;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public BigDecimal getTprice() {
        return tprice;
    }

    public void setTprice(BigDecimal tprice) {
        this.tprice = tprice;
    }

    public Integer getSid() {
        return sid;
    }

    public void setSid(Integer sid) {
        this.sid = sid;
    }

    public String getSname() {
        return sname;
    }

    public void setSname(String sname) {
        this.sname = sname;
    }
}
